#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 2e5 + 5;

using piii = pair<int, pii>;
using pliii = pair<ll, piii>;
#define F(i, j, k) pliii(f(i, j, k), piii(i, pii(j, k)))
#define P(i, j, k) piii(i, pii(j, k))
int n, m;
ll a[N], b[N], c[N];
ll f(int i, int j, int k) { return a[i] * b[j] + b[j] * c[k] + c[k] * a[i]; }
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> m;
  rep(i, 1, n) cin >> a[i];
  rep(i, 1, n) cin >> b[i];
  rep(i, 1, n) cin >> c[i];
  sort(a + 1, a + n + 1, greater<int>());
  sort(b + 1, b + n + 1, greater<int>());
  sort(c + 1, c + n + 1, greater<int>());
  priority_queue<pliii> pq;
  pq.push(F(1, 1, 1));
  set<piii> st;
  st.insert(P(1, 1, 1));
  while (pq.size()) {
    pliii now = pq.top();
    pq.pop();
    int i = now.second.first, j = now.second.second.first,
        k = now.second.second.second;
    ll val = now.first;
    // cout << m << ' ' << i << ' ' << j << ' ' << k << ' ' << val << endl;
    if (--m == 0) {
      cout << val;
      return 0;
    }
    if (i + 1 <= n && !st.count(P(i + 1, j, k))) {
      pq.push(F(i + 1, j, k));
      st.insert(P(i + 1, j, k));
    }
    if (j + 1 <= n && !st.count(P(i, j + 1, k))) {
      pq.push(F(i, j + 1, k));
      st.insert(P(i, j + 1, k));
    }
    if (k + 1 <= n && !st.count(P(i, j, k + 1))) {
      pq.push(F(i, j, k + 1));
      st.insert(P(i, j, k + 1));
    }
  }
  return 0;
}